﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using WFL.IoCUnity;

namespace WFL.RBAC
{
    [UnityConfiguration(File = "Unity.config")]
    public interface IRole
    {
        void Create(Role item);
        void Delete(int id);
        void Update(Role item);
        IList<Role> GetList(string name, int pageIndex, int pageSize);
        Role Get(int id);

        void BindCombinationRole(int id, int combinedId);
        void UnbindCombinationRole(int id, int combinedId);
        void UnbindCombinationRole(int id);
        IList<Role> GetCombinedRoleList(int id);

        void BindPermission(Permission item);
        void UpdatePermission(Permission item);
        void UnbindPermission(int id, int resourceId);
        void UnbindPermission(int id);
        IList<Permission> GetPermissionList(int id);
    }
}
